import React, { Component } from 'react';

export default class Child extends Component {
  componentDidMount() {
    console.log('Child componentDidMount');
  }

  render() {
    return <div>Child</div>;
  }

  componentDidUpdate(prevProps, prevState) {
    console.log('Child componentDidUpdate');
  }

  shouldComponentUpdate(nextProps, nextState) {
    return this.props.filter !== nextProps.filter;
  }
}
